#include<stdio.h>
#include<assert.h>
char* my_strncpy(char* des, const char* src, int num)
{
	assert(des && src);
	char* ret = des;
	while (num--)
	{
		*des++ = *src++;
	}
	return ret;
}

int main()
{
	char arr[] = "abcdefg";
	char arr1[10] = { 0 };

	printf("%s",my_strncpy(arr1, arr, 3));
	return 0;
}